<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>登陆界面</title>
</head>
<body>
<p style="color: red">${msg}</p>
<form method="post">
    <label for="username">用户名：</label>
    <input name="username" id="username" type="text">
    <label for="password">密码：</label>
    <input name="password" id="password" type="password">
    <input type="submit" value="提交">
</form>
<%
    String username = request.getParameter("username");
    if (username != null && !"".equals(username)) {
        request.getSession().setAttribute("username", username);
    }
%>
<ul>
    <li><a href="4-2.jsp">不使用过滤器的页面</a></li>
    <li><a href="4-3.jsp">使用过滤器的页面</a></li>
</ul>
</body>
</html>
